package com.example.compose.biometricauthentic.utils

import androidx.compose.material3.AlertDialog
import androidx.compose.material3.Button
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.ui.Modifier
import androidx.compose.ui.res.stringResource
import androidx.compose.ui.tooling.preview.Preview
import com.example.compose.R

@Composable
fun EnableBiometricDialog(
    modifier: Modifier = Modifier,
    onEnable: () -> Unit,
    onDismiss: () -> Unit
) {
    AlertDialog(
        onDismissRequest = onDismiss,
        title = {},
        text = {
            Text(text = stringResource(id = R.string.enable_biometric_dialog_title_text))
        },
        confirmButton = {
            Button(onClick = onEnable) {
                Text(text = stringResource(id = R.string.enable_biometric_dialog_fonfirm_btn_text))
            }
        },
        dismissButton = {
            Button(onClick = onDismiss) {
                Text(text = stringResource(id = R.string.enable_biometric_dialog_dismiss_btn_text))
            }
        }
    )
}

@Preview
@Composable
private fun EnableBiometricDialogPreview() {
    EnableBiometricDialog(onEnable = { /*TODO*/ }) {

    }
}